<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/js/ext/resources/css/ext-all.css"/>

    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/ext-all.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/ext-lang-es.js"></script>
    
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/plugins/searchfield.js"></script>
    <script type="text/javascript">
    var BASE_URL = '<?php echo base_url(); ?>' + 'index.php/';
    var BASE_PATH = '<?php echo base_url(); ?>';
    var BASE_ICONS = BASE_PATH + 'assets/icons/';
    
    Ext.onReady(function() {

        Ext.QuickTips.init();//muestra mensaje en campos obligatorios
        Ext.form.Field.prototype.msgTarget = 'side'; 
    
        var formProducto = new Ext.form.FormPanel({
        	  xtype       : 'form',
              standardSubmit: true,
              url:BASE_URL+'producto/productoInsert',
              method:'POST',
              loadMask: true,
              height      : 350,
              //autoScroll  : true,
              id          : 'formpanel',
              frame:true,
              title: 'Producto',
              bodyStyle:'padding-left:200px;padding-right:200px;',
              width: 1110,
              items: [{
            	  xtype:'fieldset',
                  title: 'Datos Producto',
                  collapsible: true,
                  items :[{
                	  xtype       : 'textfield',
                      fieldLabel : 'Producto-Base',
                      name: 'productobase',
                      anchor: '80%',
                      allowBlank: false  
                  },
                  {
                	  xtype: 'combo',  
                      triggerAction : 'all',  
                      store: ["Porcion","Medallon","Mejillas","Plateada","Colas","Cabezas"],
                      fieldLabel : 'Formato',
                      name: 'productoformato',
                      anchor: '80%',
                      allowBlank: false 
                  },{
                      xtype: 'combo',  
                      triggerAction : 'all',  
                      store: ["160 - 200 gr","200 - 400 gr","Bolsa 1,0 Kg"],
                      fieldLabel : 'Calibre',
                      name: 'calibre',
                      anchor: '80%',
                      allowBlank: false 
                    }]
              }],
              buttons: [{
                  text: 'Guardar',
                  	handler: function() {
                  		formProducto.getForm().submit();
          		}
              },{
                  text: 'Limpiar',
                  handler: function()
                  {
                	  formProducto.getForm().reset();
                  }
               }
              ]
        });

        formProducto.render('divgrid');
        strProducto.load();
        
    });  
    </script>
    <style type="text/css">
        #divgrid {
            background: #e9e9e9;
            border: 1px solid #d3d3d3;
            
        }
    </style>

    <title></title>
</head>
<body>
    <div id="divgrid"></div>
</body>
</html>